package engine.controllers;

import engine.Midlet;
import engine.data.Unit;

/**
 * This class is a partial implementation of the access point to canvas engine for a visible player.
 * 
 */
public abstract class VisiblePlayerController implements PlayerController {

	public void onActionDone(final Unit unit) {
		Midlet.canvasEngine.refreshUnitRange(unit);
	}

	public void onBeginTurn() {
		Midlet.canvasEngine.beginTurn();
	}

	public byte onBeginUnitTurn() {
		Midlet.canvasEngine.autocenter();
		return -1;
	}

	public void onDeadUnit(final short x, final short y) {
		Midlet.canvasEngine.refreshRange(x, y, (byte) 1);
	}

	public void onDeadUnits(final short x, final short y) {
		Midlet.canvasEngine.refreshRange(x, y, (byte) 1);
	}

}
